class GuestLoginData {
  UserInfo? userInfo;
  String? token;

  GuestLoginData({
    this.userInfo,
    this.token,
  });

  GuestLoginData copyWith({
    UserInfo? userInfo,
    String? token,
  }) {
    return GuestLoginData(
      userInfo: userInfo ?? this.userInfo,
      token: token ?? this.token,
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'userInfo': userInfo,
      'token': token,
    };
  }

  factory GuestLoginData.fromJson(Map<String, dynamic> json) {
    return GuestLoginData(
      userInfo: json['userInfo'] == null
          ? null
          : UserInfo.fromJson(json['userInfo'] as Map<String, dynamic>),
      token: json['token'] as String?,
    );
  }

  @override
  String toString() => "GuestLoginData(userInfo: $userInfo,token: $token)";

  @override
  int get hashCode => Object.hash(userInfo, token);

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
          other is GuestLoginData &&
              runtimeType == other.runtimeType &&
              userInfo == other.userInfo &&
              token == other.token;
}

class UserInfo {
  int? uiId;
  String? nickName;
  String? headImg;
  int? coin1;
  int? coin2;
  Null? vipTime;
  String? lastLoginTime;
  int? del;
  int? status;
  String? createIp;
  String? createTime;

  UserInfo({
    this.uiId,
    this.nickName,
    this.headImg,
    this.coin1,
    this.coin2,
    this.vipTime,
    this.lastLoginTime,
    this.del,
    this.status,
    this.createIp,
    this.createTime,
  });

  UserInfo copyWith({
    int? uiId,
    String? nickName,
    String? headImg,
    int? coin1,
    int? coin2,
    Null? vipTime,
    String? lastLoginTime,
    int? del,
    int? status,
    String? createIp,
    String? createTime,
  }) {
    return UserInfo(
      uiId: uiId ?? this.uiId,
      nickName: nickName ?? this.nickName,
      headImg: headImg ?? this.headImg,
      coin1: coin1 ?? this.coin1,
      coin2: coin2 ?? this.coin2,
      vipTime: vipTime ?? this.vipTime,
      lastLoginTime: lastLoginTime ?? this.lastLoginTime,
      del: del ?? this.del,
      status: status ?? this.status,
      createIp: createIp ?? this.createIp,
      createTime: createTime ?? this.createTime,
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'uiId': uiId,
      'nickName': nickName,
      'headImg': headImg,
      'coin1': coin1,
      'coin2': coin2,
      'vipTime': vipTime,
      'lastLoginTime': lastLoginTime,
      'del': del,
      'status': status,
      'createIp': createIp,
      'createTime': createTime,
    };
  }

  factory UserInfo.fromJson(Map<String, dynamic> json) {
    return UserInfo(
      uiId: json['uiId'] as int?,
      nickName: json['nickName'] as String?,
      headImg: json['headImg'] as String?,
      coin1: json['coin1'] as int?,
      coin2: json['coin2'] as int?,
      vipTime: json['vipTime'] as Null?,
      lastLoginTime: json['lastLoginTime'] as String?,
      del: json['del'] as int?,
      status: json['status'] as int?,
      createIp: json['createIp'] as String?,
      createTime: json['createTime'] as String?,
    );
  }

  @override
  String toString() =>
      "UserInfo(uiId: $uiId,nickName: $nickName,headImg: $headImg,coin1: $coin1,coin2: $coin2,vipTime: $vipTime,lastLoginTime: $lastLoginTime,del: $del,status: $status,createIp: $createIp,createTime: $createTime)";

  @override
  int get hashCode => Object.hash(uiId, nickName, headImg, coin1, coin2,
      vipTime, lastLoginTime, del, status, createIp, createTime);

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
          other is UserInfo &&
              runtimeType == other.runtimeType &&
              uiId == other.uiId &&
              nickName == other.nickName &&
              headImg == other.headImg &&
              coin1 == other.coin1 &&
              coin2 == other.coin2 &&
              vipTime == other.vipTime &&
              lastLoginTime == other.lastLoginTime &&
              del == other.del &&
              status == other.status &&
              createIp == other.createIp &&
              createTime == other.createTime;
}
